<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<html>
<head>
    <style>
        .error {
            color: #ff0000;
        }

        .errorblock {
            color: #000;
            background-color: #ffEEEE;
            border: 3px solid #ff0000;
            padding: 8px;
            margin: 16px;
        }
    </style>
</head>

<body>
<h2>Rejestracja</h2>

<form:form method="POST" commandName="userForm">
    <form:errors path="*" cssClass="errorblock" element="div" />
    <table>
        <tr>
            <td>Login :</td>
            <td><form:input path="username" />
            </td>
            <td><form:errors path="username" cssClass="error" />
            </td>
        </tr>
        <tr>
        <tr>
            <td colspan="3"><input type="submit" value="Next"
                                   name="_target1" />
            </td>
        </tr>
    </table>
</form:form>

</body>
</html>